// index.js
// 获取应用实例
const app = getApp()
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'

Page({
  data: {
      nav_show:false,
      nav_title:'秉华健康-健康数据管家',
      fontColor:'#ffffff',
      headname:'点击登录',
      headurl:defaultAvatarUrl,
      head_id_show:false,
      showInput:false,
      theme: 'light',
      indicatorDots: true,
      vertical: false,
      autoplay: false,
      interval: 2000,
      duration: 500,
      list:[
        {"image_url":'../../static/home/banner/banner1.jpg'},
        {"image_url":'../../static/home/banner/banner2.jpg'},
        {"image_url":'../../static/home/banner/banner3.jpg'},
        {"image_url":'../../static/home/banner/banner4.jpg'},
      ]
  },
  login(){
    if(this.data.headname=="点击登录"){
      this.setData({
        showInput:true,
      })
    }else{
      console.log(this.data.headurl)
      console.log(this.data.headname)
      let headname = this.data.headname
      let headurl = this.data.headurl
      wx.navigateTo({ url:'../Personal_infor/Personal_infor?headname='+headname+ '&headurl='+headurl})
    }
  },
  headinfo(event) {
      // console.log(event.detail)
      this.setData({
        headurl:event.detail.headurl,
        headname:event.detail.headname,
        showInput:event.detail.showInput,
        head_id_show:true
      })
  },
  To_set_enter(){
    wx.navigateTo({ url: '../set_enter/set_enter'})
  },
  To_medical_report_list(){
    wx.navigateTo({ url: '../medical_report_list/medical_report_list'})
  },
  To_blood_record(){
    wx.navigateTo({ url: '../blood_record/blood_record'})
  }
})
